package org.example.factory.simple.abs.impl;

import org.example.factory.simple.abs.AbsFactory;
import org.example.factory.simple.abs.LDChessePizza3;
import org.example.factory.simple.abs.LDPepperPizza3;
import org.example.factory.simple.abs.Pizza3;

/**
 * @author
 * @description
 */
public class LDFactoryImpl implements AbsFactory {
    @Override
    public Pizza3 createPizza3(String orderType) {
        System.out.println("~使用LD抽象工厂模式~");
        Pizza3 pizza=null;
        if (orderType.equals("cheese")){
            pizza=new LDChessePizza3();
        }else if (orderType.equals("pepper")){
            pizza=new LDPepperPizza3();
        }
        return pizza;
    }
}
